package com.easychat.entity.enums;

/**
 * @Author: yudaxian
 * @Description: TODO
 * @DateTime: 2024/8/11 14:20
 **/
public enum GroupStatusEnum {
    NORMAL(1, "正常"),
    DISBAND(0, "解散"),
    ;

    private Integer status;

    private String desc;

    public static GroupStatusEnum getByStatus(Integer status) {
        for (GroupStatusEnum groupStatusEnum : GroupStatusEnum.values()) {
            if (groupStatusEnum.getStatus().equals(status)) {
                return groupStatusEnum;
            }
        }
        return null;
    }

    GroupStatusEnum(Integer statis, String desc) {
        this.status = statis;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
